<?php
 // module/Album/view/album/album/index.phtml:
 $title = 'My albums';
 $this->headTitle($title);
?>
<div class="hero-unit">
<?php echo CONTROLLER_NAME; ?>
<h1><?php echo $this->escapeHtml($title); ?></h1>
<p>
    <a href="<?php echo $this->url('album/default', array('action'=>'add'));?>">Add new album</a>
</p>

<table class="table">
    <tr>
        <th>Title</th>
        <th>Artist</th>
        <th>&nbsp;</th>
    </tr>
<?php foreach ($this->paginator as $album) : // <-- change here! ?>
    <tr>
        <td><?php echo $this->escapeHtml($album->title);?></td>
        <td><?php echo $this->escapeHtml($album->artist);?></td>
        <td>
            <a href="<?php echo $this->url('album/default',
             array('action'=>'edit', 'id' => $album->id));?>">Edit</a>
            <a href="<?php echo $this->url('album/default',
             array('action'=>'delete', 'id' => $album->id));?>">Delete</a>
        </td>
    </tr>
<?php endforeach; ?>
</table>

<?php
// add at the end of the file after the table
echo $this->paginationControl(
 // the paginator object
 $this->paginator,
 // the scrolling style
 'sliding',
 // the partial to use to render the control
 array('partial/paginator.phtml', 'Album'),
 // the route to link to when a user clicks a control link
 array(
     'route' => 'album'
 )
);
?>
</div>